package com.wangjiacai.hqlQuery.role.security.authentication;

import lombok.Data;

import java.util.HashSet;
import java.util.Set;

@Data
public class TokenAuthentication<T> {

    private String token;

    private T credentials;

    private Set<String> grantedAuthority;

    public void addGrantedAuthority(String grantedAuthority){
        if(this.grantedAuthority==null){
            this.grantedAuthority=new HashSet<>();
        }
        this.grantedAuthority.add(grantedAuthority);
    }
}
